package csc.daonjpa.java.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import csc.daonjpa.java.dao.CardDAO;
import csc.daonjpa.java.domain.Card;

@Component
public class CardService {
	private CardDAO cardtDAO;

	public CardDAO getCardtDAO() {
		return cardtDAO;
	}
	@Autowired
	public void setCardtDAO(CardDAO cardtDAO) {
		this.cardtDAO = cardtDAO;
	}

	public void addCard(Card card) {
		cardtDAO.addCard(card);
	}

	public List<Card> getCards() {
		return cardtDAO.getCards();
	}
	
	public List<Card> getCardByCustomer(String loginId) {
		return cardtDAO.getCardByCustomer(loginId);
	}
}
